<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Kimi翻译助手</title>
    <style>
        body {
            width: 100%;
            margin: 0;
            padding: 16px;
            font-family: Arial, sans-serif;
            color: #333333;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
        }

        .header {
            text-align: center;
            margin-bottom: 20px;
            color: #4285f4;
        }

        .language-selector {
            display: flex;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        select {
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 45%;
        }

        .text-area {
            width: 100%;
            min-height: 150px;
            margin-bottom: 12px;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            resize: vertical;
        }

        .button-group {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        button {
            padding: 8px 16px;
            background-color: #4285f4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        button:hover {
            background-color: #3367d6;
        }

        .tab-container {
            margin-bottom: 12px;
        }

        .tab-buttons {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        .tab-button {
            padding: 8px 16px;
            background-color: #f0f0f0;
            color: #333;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .tab-button.active {
            background-color: #4285f4;
            color: white;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>Kimi翻译助手</h1>
        </div>

        <div class="tab-container">
            <div class="tab-buttons">
                <button class="tab-button active" data-tab="translate">翻译</button>
                <button class="tab-button" data-tab="summary">总结</button>
            </div>
        </div>

        <div id="translate-panel">
            <div class="language-selector">
                <select id="sourceLanguage">
                    <option value="auto">自动检测</option>
                    <option value="zh">中文</option>
                    <option value="en">英语</option>
                    <option value="ja">日语</option>
                    <option value="ko">韩语</option>
                </select>
                <select id="targetLanguage">
                    <option value="zh">中文</option>
                    <option value="en">英语</option>
                    <option value="ja">日语</option>
                    <option value="ko">韩语</option>
                </select>
            </div>

            <textarea id="sourceText" class="text-area" placeholder="请输入要翻译的文本或从页面选择文本"></textarea>
            <div class="button-group">
                <button id="translateBtn">翻译</button>
                <button id="clearBtn">清空</button>
                <button id="copyBtn">复制</button>
            </div>
            <textarea id="resultText" class="text-area" placeholder="翻译结果" readonly></textarea>
        </div>

        <div id="summary-panel" style="display: none;">
            <textarea id="summaryResult" class="text-area" placeholder="页面总结内容" readonly></textarea>
            <div class="button-group">
                <button id="summarizeBtn">总结页面</button>
                <button id="copySummaryBtn">复制总结</button>
            </div>
        </div>
    </div>
    <script src="js/sidepanel.js"></script>
</body>
</html> 